// sysModel.js
const Base = require('../base.js');
// https://testjoylearning.bmw.com.cn:8080/sys/storeApprove/list?pageNo=1&pageSize=10
module.exports = function(sequelize, DataTypes) {
    function getAttributes(sequelize, DataTypes) {
        const attributes = {
            valId: {
                field: "val_id",
                type: DataTypes.BIGINT(20),
                primaryKey: true,
                comment: "值列表ID"
            },
            valCode: {
                field: "val_code",
                type: DataTypes.STRING(50),
                allowNull: false,
                comment: "值列表编码"
               
            },
            valName: {
                field: "val_name",
                type: DataTypes.STRING(50),
                allowNull: false,
                comment: "值列表名称"
               
            },
            remark: {
                field: "remark",
                type: DataTypes.STRING(500),
                allowNull: true,
                comment: "备注",
            },
            ...Base.getAttr(sequelize, DataTypes)
            
            
        };
        return attributes;
    };
    const sysValues = sequelize.define('sysValues', getAttributes(sequelize, DataTypes), {
        freezeTableName: true,
        tableName: "sys_values",
        timestamps: false
    });
    
    Base.extendModel(sysValues, getAttributes(sequelize, DataTypes));
    return sysValues;
};